package com.beisita.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.beisita.dao.entity.StuEntity;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Author:roger
 * @Date: 2020/9/26
 * @Time: 19:20
 */
@Repository
public interface StuMapper extends BaseMapper<StuEntity> {
    /**
     * 获取所有用户
     *
     * @return
     */
    List<StuEntity> getAll();

    /**
     * 根据id获取用户
     *
     * @return
     */
    StuEntity getOne(Long id);

    /**
     * 新增用户
     *
     * @param stu
     */
    void insertStu(StuEntity stu);

    /**
     * 修改用户
     *
     * @param stu
     */
    void updateStu(StuEntity stu);

    /**
     * 删除用户
     *
     * @param id
     */
    void deleteStu(Long id);

    StuEntity queryById(long id);

    List<StuEntity> queryByPage(Map<String, Object> map);

    List<StuEntity> queryByOptPage(Map<String, Object> map);
}